<?php
require_once('com/login/bussines/Login.class.php');
class ProcessLogin{
  var $loginObj;
  var $username;
  var $password;
  
  public function ProcessLogin(){
  
    $this->loginObj=new Login();

  }
  function doLogin($username,$password){
    $login=$this->loginObj->getExistUser($username,$password);
    
    if(sizeof($login)<1){
      print 'false';
    }else{
      $dologin=$this->loginObj->doLogin($username);
      $rs=json_encode($login);
      print $rs;
    }
  }
  
  function doLogout($username){
    $logout=$this->loginObj->doLogout($username);
    if($logout==true)
      print 'true';
    else
      print 'false';
        
  }

}
?>
